
import React, { useState } from "react";
import { Button } from 'antd'
import styles from './change_button.less'
import 'antd/dist/antd.less';

const ChangeButton = (props) => {
  const [btnTxt, setBtnTxt] = useState("Login");
  return (
    <React.Fragment>
      <div
        className={styles.btn}
        onClick={() => { setBtnTxt(btnTxt === "Login" ? "Logout" : "Login"); }} >
        <span>{btnTxt}</span>

      </div>
      <Button type={"primary"} onClick={() => console.log("终于出来了")}>你好啊看到我开心吗</Button>
    </React.Fragment>
  );
};

export default ChangeButton;
